﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Project.UI;
using Project;
using Project.controller;
using FairyGUI;

using System.IO;
using System;

using XLua;

public class InitController : MonoBehaviour {

    public delegate bool HotFixFinished();
    public static HotFixFinished HotFixFinish;
    

	void Start () {
        //NavigationController.Instance.PushViewController(UIManager.Instance.AddInitPage());
        InitLua();
	}

    void InitLua()
    {
        Debug.Log("开始检查热更新");
        if (true)
        {
            Debug.Log("发现需要更新");
            Debug.Log("下载");
            Debug.Log("解压");
            Debug.Log("热更新中。。。。");
            
            //XluaManager.Instance.InitLuaFile(BuildPath._Instance.PCPath_hotFix, "myHotfix");
            Debug.Log("热更新完成");
        }

        XluaManager.Instance.InitLuaFile(BuildPath._Instance.PCPat_lua, "Main");

        //XluaManager.Instance.luaenv.DoString("require 'InitController'");
        hotFixTest.print();

        
        
    }

    

}

